package com.polymorphic.polyparameter;

/**
 * @Author 小闽
 * @Date 2024/8/13 18:11
 * @PackageName: com.polymorphic.polyparameter
 * @ClassName: Employee
 * @Description: 员工类
 * @Version 1.0
 */
public class Employee {
    private String name;
    private double salary;

    /**
     * 构造器
     * @param name
     * @param salary
     */
    public Employee(String name, double salary) {
        this.name = name;
        this.salary = salary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }
    /**
     * 计算年工资方法getAnnual()
     * @param
     */
    public double getAnnual(){
        return this.salary * 12;

    }
}
